﻿using System;
using com.diagnosis.tool.xml;
using System.Collections.Generic;
namespace DiagnosisToolBL
{
    public class ExtendedDiseaseForBuilder
    {
        private Disease mDisease;

        private List<SympNameIDPair> mSymptoms = new List<SympNameIDPair>();

        public ExtendedDiseaseForBuilder()
        {
            // TODO: Complete member initialization
        }
        
        public ExtendedDiseaseForBuilder(
            Disease pDisease,
            Dictionary<int, List<string>> pIdToSymptoms)
        {
            mDisease = pDisease;

            foreach (var curId in pDisease.SymptomIDS)
            {
                foreach (var strName in pIdToSymptoms[curId])
                {
                    var pair = new SympNameIDPair(strName, curId);
                    mSymptoms.Add(pair);
                } 
            }
        }

        public void SetDisease(Disease pDisease)
        {
            mDisease = pDisease;
        }

        public Disease GetDisease()
        {
            return mDisease;
        }

        public List<SympNameIDPair> GetSymptoms()
        {
            return mSymptoms;
        }
    }
}
